#include <bits/stdc++.h>
using namespace std;

int main()
{
    double n;
    cin >> n;
    double sum = 0.0;
    if (n <= 150)
    {
        sum += n*0.4463;
        printf("%.1f", sum);
    }
    else if (n >= 151 && n <= 400)
    {
        double tmp = n - 150;
        sum += 150 * 0.4463;
        sum += tmp * 0.4663;
        printf("%.1f", sum);
    }
    else if (n >= 401)
    {
        double tmp = n - 400;
        sum += 150*0.4463;
        sum += 250*0.4663;
        sum += tmp * 0.5663;
        printf("%.1f", sum);
    }
    return 0;
}